package yx.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * SmCode entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "sm_code", catalog = "")
public class SmCode implements java.io.Serializable {

	// Fields

	private Integer id;
	private String cname;
	private String cvalue;
	private String ctype;

	// Constructors

	/** default constructor */
	public SmCode() {
	}

	/** full constructor */
	public SmCode(String cname, String cvalue, String ctype) {
		this.cname = cname;
		this.cvalue = cvalue;
		this.ctype = ctype;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "CNAME", length = 32)
	public String getCname() {
		return this.cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	@Column(name = "CVALUE", length = 64)
	public String getCvalue() {
		return this.cvalue;
	}

	public void setCvalue(String cvalue) {
		this.cvalue = cvalue;
	}

	@Column(name = "CTYPE", length = 2)
	public String getCtype() {
		return this.ctype;
	}

	public void setCtype(String ctype) {
		this.ctype = ctype;
	}

}